<?php

namespace app\index\controller;
use app\common\model\Liuyan as LiuyanModel;

class Liuyan
{
	/**
     * [add  添加]
     * @author [南風]
     * @return array|mixed
     */
	public function add()
	{
		$model = new LiuyanModel();

		$data = input("param.");

		if(empty($data))
			return index_json(-1,"失败，参数不全！");
		
		try{

            $model->addData($data);

            return index_json(1,"成功！");

        }catch(\Exception $e){

            return index_json(-2,$model->getError());
        }
		
	}
}
